﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="commonCode.aspx.cs" Inherits="_commonCode" ValidateRequest="false" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>代码生成</title>
<script language="javascript">
    function oCopy(obj) {
        obj.select();
        js = obj.createTextRange();
        js.execCommand("Copy")
        //alert("已经复制所点击的代码到剪贴板!");
    }
</script>
<link href="/css/css.css" rel="stylesheet" type="text/css" />  
</head>
<body>
        <form id="form1" runat="server">
    <div>
<table class="gridtable" style="width:900px;" >
     <thead>
  <tr >
    <th>&nbsp;</th>
    <th class="tdFormRight">生成asp.net 下拉html和后台绑定</th>
  </tr>
       </thead>
   <tr style="display:none;" >
    <td class="tdFormLeft">类型：</td>
    <td>
<asp:RadioButtonList ID="rdDbType" runat="server"     RepeatDirection="Horizontal" RepeatLayout="Flow">
	<asp:ListItem Value="ddl"  Selected="True">asp.net drop down list</asp:ListItem>
	<asp:ListItem Value="batsql" >模板生成</asp:ListItem>
</asp:RadioButtonList>

	</td>
  </tr> 

  <tr>
    <td  class="tdFormLeft">代码：</td>
    <td>
        <asp:TextBox ID="txtCont" runat="server" TextMode="MultiLine" Height="166px" Width="746px">
            &lt;asp:RadioButtonList ID=&quot;rd[1]&quot; runat=&quot;server&quot; RepeatDirection=&quot;Horizontal&quot; RepeatLayout=&quot;Flow&quot;&gt;

            &lt;asp:DropDownList ID=&quot;ddl[1]&quot; runat=&quot;server&quot; DataTextField=&quot;txt&quot; DataValueField=&quot;val&quot; CssClass=&quot;scinput1&quot;&gt;

            ddl[1].DataSource = Bll.listData.getDataList(&quot;[2]&quot;,mLoginfo.companyId);
            ddl[1].DataBind();
            ddl[1].Items.Insert(0, new ListItem(&quot;[3]&quot;, &quot;0&quot;));

        </asp:TextBox>     
    </td>
  </tr>
  <tr>
    <td  class="tdFormLeft">参数：</td>
    <td><asp:TextBox ID="txtPara" runat="server"  Width="746px">companyId,部门名称，顶级部门</asp:TextBox>   
        &nbsp;</td>
  </tr>
 <tr>
    <td  class="tdFormLeft">结果：</td>
    <td><asp:TextBox ID="txtResult" runat="server"  TextMode="MultiLine" Height="106px" Width="746px">
      
        </asp:TextBox>   
        &nbsp;</td>
  </tr>

  <tr>
    <td  class="tdFormLeft">&nbsp;</td>
    <td>
    </td>
  </tr>

</table>
    <div class="row" style="margin-top:10px;">
        <span style="margin-left:100px;"></span>
        <asp:Button ID="btnGenCode" runat="server" Text=" 生成SQL " OnClick="btnGenCode_Click" />&nbsp;&nbsp;
        &nbsp;&nbsp;
    </div>
        <asp:Label ID="lblMsg" runat="server" Text="" ForeColor="#FF3300"></asp:Label>    
        <asp:Label ID="lblResult" runat="server" Text="" ForeColor="#FF3300"></asp:Label>    
 
        <p>
     
            &nbsp;&nbsp;
        </p>
    </div>
    </form>
<div class="memo">
<pre>
&nbsp;</pre>
    <pre>
<script type="text/javascript" src="/js/WdatePicker.js"></script>

 onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})"

</pre>
    </div>
</body>
</html>
